library CmdLine requires lib
    
    /*
    --------------------------------------------------------------------------
    # 清空屏幕
    --------------------------------------------------------------------------
    */
    private function clearScreen takes nothing returns nothing
        if GetLocalPlayer() == GetTriggerPlayer() then
            call ClearTextMessages()
        endif
    endfunction

    //====================================================================
    private function InitChatCommond takes nothing returns nothing
        call AddChatCommand("-clear", function clearScreen)
    endfunction
    
    private function Init takes nothing returns nothing
        call InitChatCommond()
    endfunction
endlibrary